<?php
/**

 //  [DoYouHaoBaby!] Init APP - blog
 //  +---------------------------------------------------------------------
 //
 //  “Copyright”
 //  +---------------------------------------------------------------------
 //  | (C) 2010 - 2099 http://doyouhaobaby.net All rights reserved.
 //  | This is not a free software, use is subject to license terms
 //  +---------------------------------------------------------------------
 //
 //  “About This File”
 //  +---------------------------------------------------------------------
 //  | blog Index控制器
 //  +---------------------------------------------------------------------

*/

!defined('DYHB_PATH') && exit;

class IndexController extends InitController{

	public function index(){

		//G::dump(__ROOT__."\n".__APP__."\n".__URL__."\n".__SELF__."\n".APP_PATH."\n".__ENTER__."\n".__PUBLIC__);
		//G::dump(__TMPLPUB__."\n".__TMPL__."\n".__THEME__."\n".__APPPUB__."\n".APP_PATH."\n".__ENTER__."\n".__PUBLIC__);
		//$syear=intval(G::getGpc('year','G'));
		//$smonth=intval(G::getGpc('month','G'));
		//if(!empty($syear)){
		//	$_POST['year']=$syear;
		//}
		//if(!empty($smonth)){
		//	$_POST['month']=$smonth;
		//}
		$oAtl=ArticleModel::F()->all()->order('article_id DESC')->limit(0,5)->query();
		//G::dump($oAtl);
		//exit;
		$blog_name="Yming博客";
		$this->assign('blog_name',$blog_name);
		$sImgPath=str_replace(G::tidyPath(BLOG_PATH),__ROOT__.'/blog',G::tidyPath($GLOBALS['IMG_PATH']));
		$this->assign('img_path',$sImgPath);
		$this->assign("arrObt",$oAtl);
		$this->assign('title','博客首页');
		$this->display();
	}
}